{% extends "base.html" %}

{% block content %}

<form action="/auth/login" method="post">
<div style="padding-top: 30px;">
	<div class="options-group">
		<div class="options-content">
			<div class="options-group-heading">
				Log in
			</div>
			<div class="rule"></div>
			{% if g.welcome_message is defined %}
			<div class="option">
				<dl>
					<dt></dt>
					<dd>{{g.welcome_message}}</dd>
				</dl>
			</div>
			<div class="rule"></div>
			{% endif %}
			<div class="option">
				<dl>
					<dt>Username</dt>
					<dd><input type="text" name="username"></dd>
				</dl>
			</div>
			<div class="rule"></div>
			<div class="option">
				<dl>
					<dt>Password</dt>
					<dd><input type="password" name="password"></dd>
				</dl>
			</div>
			<div class="rule"></div>
			<div class="option">
				<dl>
					<dt></dt>
					<dd><input type="submit" value="Log in" class="button button_red" /></dd>
				</dl>
			</div>
		</div>
	</div>
</div>
</form>

{% if g.error %}
<div id="login_failure_container">
	<div class="options-group">
		<div class="options-content">
			<h3 class="options-group-heading">Result</h3>
			<div style="padding: 15px; background-color: #ffcccc;">
				{{ g.error }}
			</div>
		</div>
	</div>
</div>
{% endif %}

{% if g.logged_out %}
<div id="logout_successful_container">
	<div class="options-group">
		<div class="options-content">
			<h3 class="options-group-heading">Result</h3>
			<div style="padding: 15px; background-color: #ccffcc;">
				Logged out
			</div>
		</div>
	</div>
</div>
{% endif %}

{% endblock %}
